package cn.zxf.note.security;

import java.util.Set;

public interface SecurityConstant {

    String
            PARAM_SEPARATOR = "--",
            KEY_CUR_USER_ID = "cur-user-id",
            KEY_AUTH_TOKEN = "authentication-token",
            SECRET_KEY = "中-xx-yy-@-key-19-note!",
            SECRET_KIND = "AES/ECB/PKCS5Padding";

    long VALID_INTERVAL_1H = 60L * 60 * 1000;
    long VALID_INTERVAL_7D = 7L * 24 * 60 * 60 * 1000; // remember
    Set<String> NO_AUTH_PATHS = Configuration.NO_AUTH_PATHS;


    class Configuration {
        static final Set<String> NO_AUTH_PATHS;

        static {
            NO_AUTH_PATHS = Set.of(
                    "/api/security/login",
                    "/api/security/platformLogin",
                    "/api/security/bind",
                    "/api/security/register",
                    "/api/security/resetPassword"
            );
        }
    }

}
